Skip to content

refactor: round 2 — phased extractions from the god-files (plan) - #39

Open
johnaoga wants to merge 1 commit into
mainfrom
ja/refactoring/2
Open

johnaoga wants to merge 1 commit into
mainfrom
ja/refactoring/2

Conversation

@johnaoga

@johnaoga johnaoga commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Second refactoring round, replacing the stale ja/refactoring/1 (#11) which forked at e7723be — before newversion (#21), SLURM staging (#24/#32), logging (#29), webgui (#31), video perf (#35), optional apps (#36), matlab-parallel (#37) and the cuNCorr engine integration. That branch cannot be rebased (every file it touched was rewritten), but several of its designs survive as specs.

This PR starts with the plan document (docs/refactoring_plan.md); implementation commits will follow on this branch. A companion plan/PR exists in the CppNCorr submodule (xdic-dev/CppNCorr#19).

Review of round 1

Plan

  • Phase 1: matio_helpers cherry-pick; CheckpointPolicy centralizing stage-artifact checks now duplicated across step_d_workflow.cpp and dic_analysis.cpp (contract for feat(cluster): stage-decomposable pipeline (--stages) + SLURM array scripts #32 SLURM staging).
  • Phase 2: split mat_writer.cpp (2721 → ~600 ln) into src/io/mat/ codecs; binary-format parity guarded by existing tests.
  • Phase 3: decompose step_d_workflow.cpp (1352 → ~300 ln) into frame-preparer / ROI-seed / matching / tracking services; formalize the DIC-engine interface shared by CppNCorr and cuNCorr.
  • Phase 4: visualization (colormap/panel/field-exporter), config/parameter validation layer, image/ROI utility consolidation.

Guardrails: behavior-preserving moves only, tests + staged-pipeline smoke green per step, checkpoint file paths treated as a compatibility contract. Sequencing note: coordinate with feat/cuncorr-integration before touching the DIC2D call sites it modifies.

Supersedes #11.

🤖 Generated with Claude Code

Review of the stale ja/refactoring/1 branch against current main: the
branch cannot be rebased (mat_writer, step_d_workflow, dic_analysis all
rewritten by #21/#32/#36/#37), but its matio_helpers, checkpoint-policy
and DIC2D service interfaces survive as specs. Re-planned as phased
extractions against today's code, accounting for staged execution and
the cuNCorr engine seam.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@johnaoga
johnaoga marked this pull request as ready for review July 5, 2026 17:42

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant